﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
         string PageType = this.Page.ToString();

         if (PageType != "ASP.default_aspx")
         {
             //divHomeHolder.Visible = false;
             //divWidgetContainer.Attributes.Remove("class");
             //divWidgetContainer.Attributes.Add("class", "non_widget_container");
             }

         string strMarine = Convert.ToString(Session["Marine"]);

         if (strMarine == "")
         {
             //Gets the IP Address if needed
             string strHost = Convert.ToString(Request.ServerVariables["LOCAL_ADDR"]);

             //Gets the domain name in www.*****.org format
             string strHost2 = Convert.ToString(Request.Url.Host);

             if (strHost2 == "www.wdpa-marine.org")
             {
                 Session["Marine"] = "Active";
             }
         }
    }
}
